home *** CD-ROM | disk | FTP | other *** search
- Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.kodak.com!news-nysernet-16.sprintlink.net!news-east1.sprintlink.net!news-peer1.sprintlink.net!news.sprintlink.net!newsfeed.berkeley.edu!su-news-hub1.bbnplanet.com!news.gtei.net!news1.best.com!news.idiom.com!news3.best.com!nntp1.ba.best.com!not-for-mail
- From: pvdl@best.com (Peter van der Linden)
- Newsgroups: comp.lang.java.programmer,comp.lang.java.help,comp.lang.java.gui,comp.answers,news.answers
- Subject: Java Programmers FAQ -- diffs
- Followup-To: poster
- Date: 1 Dec 1998 16:19:02 -0800
- Approved: news-answers-request@MIT.EDU
- Message-ID: <74211m$988$1@shell15.ba.best.com>
- References: <7420th$8ud$1@shell15.ba.best.com>
- Archive-name: computer-lang/java/programmers/diff
- Lines: 106
- NNTP-Posting-Host: shell15.ba.best.com
- X-Trace: nntp1.ba.best.com 912557948 209 pvdl@206.184.139.147
- Xref: senator-bedfellow.mit.edu comp.lang.java.programmer:171182 comp.lang.java.help:37609 comp.lang.java.gui:22937 comp.answers:34101 news.answers:145719
-
- Here are the Java FAQ diffs from the last posting.
-
-
- 11c11
- - Last-modified: 1998/11/18
- ---
- + Last-modified: 1998/11/22
- 560a566,592
- + 19. (Sect 2.) How can I find out exactly what version of Java I have on my
- + system?
- +
- + [*] On a Solaris system, you can use the pkginfo command, like this:
- +
- + pkginfo -l SUNWjvrt
- +
- + It will give a reply like this:
- +
- + PKGINST: SUNWjvrt
- + NAME: JavaVM run time environment
- + CATEGORY: system
- + ARCH: sparc
- + VERSION: 1.1.6,REV=1998.07.30.16.21
- + BASEDIR: /
- + VENDOR: Sun Microsystems, Inc.
- + ...etc
- +
- + You may also try
- +
- + java -fullversion
- +
- + Although that's not an officially-supported command option, and has
- + gone away in JDK 1.2. Try also
- +
- + java -version
- +
- 3622,3625c3654,3655
- - Where things get even trickier is in the case where you want an int
- - within a certain range, say 1 to 6 to simulate the throw of a die or 1
- - to 52 to represent a playing card. Class Random has a nextInt method
- - that will return any integer:
- ---
- + JDK 1.2 adds another version of nextInt that accepts a parameter for
- + returning ranged random numbers.
- 3626a3657,3661
- + Where things get trickier is when you use JDK 1.1 and want an int in a
- + certain range, say 1 to 6 to simulate the throw of a die or 1 to 52 to
- + represent a playing card. Class Random has a nextInt method that will
- + return any integer:
- +
- 5039c5074
- - g.drawImage(offg, 0, 0, null);
- ---
- + g.drawImage(myimage, 0, 0, null);
- 5045c5080
- - g.drawImage(offg, 0, 0, null);
- ---
- + g.drawImage(myimage, 0, 0, null);
- 5050c5085
- - clearest to override them separately, like this.
- ---
- + clearest to override them separately, as in the example.
- 5155,5160c5190,5191
- - [*] There is no way in Java today to write code to force a window to
- - iconify or deiconify. There is a way (tested on Windows and UNIX) to
- - achieve this effect that involves creating and destroying peers, but it
- - is not recommended. You can drop into native code to do it. The "party
- - line" in JavaSoft is that it is because Java is an application
- - language, not a window manager. Everyone wishes they'd add it.
- ---
- + [*] JDK 1.1 had no way to write code to force a window to iconify or
- + deiconify. Support was added in JDK 1.2.
- 5161a5193,5197
- + MyFrame.setState( Frame.ICONIFIED );
- + MyFrame.setState( Frame.NORMAL );
- +
- + will do the trick. There is a corresponding getState();
- +
- 5381c5417
- - import javax.swing.plaf.windows.WindowsLookAndFeel;
- ---
- + import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
- 5948c5984
- - 15. (Sect. 12) How can I resize an applet?
- ---
- + 15. (Sect. 13) How can I resize an applet?
- 6669,6672c6705,6709
- - streams. If you close one of them, the other seems to 'break'
- - instantly. Check whether this is happening for you, by adding the
- - matched pair.
- - [comments from net gurus welcome]
- ---
- + streams. A TCP connection is full duplex, but either the send or
- + receive side may be closed independently. By default, the remote end
- + will take the close as indicating that the connection has simply been
- + closed, and will close its end as well. Check whether this is happening
- + for you, by adding the matched pair. Use tcpdump to check this.
- 7456,7463c7493,7501
- - javac -J-Djavac.pipe.output=true myfile.java > errors.txt You typically
- ---
- + javac -J-Djavac.pipe.output=true myfile.java > errors.txt In JDK 1.2,
- + you can use: javac -Xstdout
- + You typically use this when a compilation produces a lot of error
- 8568c8606
- - Tomm Hoeft
- ---
- + Tomm Hoeft, King Dale, Joe Halpin
-